package lyo.levelup.person.personfactory;
import lyo.levelup.person.persontest.Employee;
import lyo.levelup.person.persontest.Person;
import lyo.levelup.person.persontest.PersonType;
import lyo.levelup.person.persontest.Player;
public class PersonFactory {
    public static Person createPerson(String name, String surName, double pay, int countWork, PersonType idType)
    {
        switch(idType)
        {
            case Employee:
                return new Employee(name, surName, pay, countWork, idType);
            case Player:
                return new Player(name, surName, pay, countWork, idType);
            default:
                return null;               
        }    
    }
}
